docgen: more fixes#3266
Merged
Merged
Conversation
handle `type->subtype` TYPE_COMPRESSED_*
omits stdlib in the output when the flag is used with no
don't show CONTRACT column if all empty
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--emit-stdlib=<yes|no>to the docgen: Omits printing the stdlib from the output.handle TYPE_COMPRESSED_*
example: https://c3-lang.org/standard-library/docs.html#std::thread::channel::create_one_shot
before:
now:
before was showing this signature in the web:
fn OneShotChannel? create_one_shot(Allocator allocator) <Type>now correctly shows
fn OneShotChannel*? create_one_shot(Allocator allocator) <Type>handle varargs
...added
"is_vararg": trueto the jsonexample:
https://c3-lang.org/standard-library/docs.html#std::encoding::pem::encode_many
before it was showing this signature in the web:
fn String? encode_many(Allocator allocator, char[][] bodies, String[] tags, PemHeader[][] pem_headers, bool use_crlf = false)now correctly shows
fn String? encode_many(Allocator allocator, char[][] bodies, String[] tags, PemHeader[]... pem_headers, bool use_crlf = false)We correctly omit showing empty "contract" column for generic macro like
docs.html#std::collections::linkedlist::linked_list_alloc_node, and on methods we are correctly showing the type of &self, as the field type.TODO: We are missing showing the type for a generic method: for example for
docs.html#std::collections::linkedlist::LinkedList.lastwe should be showingLinkedList{Type}. this could be handled in the frontendwe already have the info in the json:
{ "name": "last", "kind": "method", "uid": "std::collections::linkedlist::LinkedList.last", "file": "lib/std/collections/linkedlist.c3:131:21", "is_generic": true, "generic_parameters": [ "Type" ], "return_type": { "name": "Type?" }, "members": [ { "name": "self", "is_ref": true } ], "docs": null }